9c3e5bcad0ec2d64bc79c36942b7c2cd9111f814,core/kernel/source/jetbrains/mps/smodel/constraints/ModelConstraintsManager.java,ModelConstraintsManager,getCanBeRootMethod,#String#IOperationContext#,653

Before Change


      return null;
    }

    String behaviorClassName = constraintsClassByConceptFqName(fqName);
    Class behaviorClass = language.getClass(behaviorClassName);

    if (behaviorClass == null) {

After Change



  @Nullable
  private Method getCanBeRootMethod(String conceptFqName, IOperationContext context) {
    synchronized (myCanBeRootMethods) {
      if (myCanBeRootMethods.containsKey(conceptFqName)) {
        return myCanBeRootMethods.get(conceptFqName);
      }

      IScope scope = context.getScope();
      SNode concept = SModelUtil.findConceptDeclaration(conceptFqName, scope);

      if (concept != null) {
        String fqName = NameUtil.nodeFQName(concept);
        Language language = scope.getLanguage(NameUtil.namespaceFromConceptFQName(fqName));
        if (language != null) {

          Class behaviorClass = language.getClass(constraintsClassByConceptFqName(fqName));
          if (behaviorClass != null) {
            try {
              Method method = behaviorClass.getMethod(BehaviorConstants.CAN_BE_A_ROOT_METHOD_NAME, IOperationContext.class, CanBeARootContext.class);